<div class="mt20 clearfix ng-scope ml25">
    <button href="javascript:;" class="btn"
            ui-dialog="新增合同主责人"
            ui-dialog-data="{}"
            ui-dialog-show="onPrincipalEditShow(null,$dialog,$dialogScope)"
            ui-dialog-ok="addContractPrincipal($data,$dialog,$dialogScope)"
            ui-dialog-cache="false"
            ui-dialog-url="${require('../pages/base/base-inc-edit-principal.html?url')}"
            ng-if="contractBaseInfo.contract_status == 0 && contractBaseInfo.is_cancelled == 0"
    >新增合同主责人
    </button>
</div>
<div id="grid" class="table-wrap mt10 ml25" style="min-height: 200px;">

    <table width="100%">
        <thead>
        <tr>
            <th width="40">序号</th>
            <th width="80" class="align-l">合同主责人</th>
            <th width="130" class="align-l">所属ABU</th>
            <th width="130" class="align-l">所属部门</th>
            <th width="130" class="align-l">所属公司</th>
            <th width="110" class="align-m">生效开始日期</th>
            <th width="110" class="align-m">生效截止日期</th>
            <th width="250" class="align-m">备注</th>
            <th width="100" class="align-m">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="principal in principals" ng-if="principal.__type != 'delete'">
            <td height="40"><p ng-bind="$index + 1"></p></td>
            <td class="lh14 align-l">
                <p ng-bind="principal.principal_name"></p>
            </td>
            <td class="align-l">
                <p ng-bind="principal.principal_abu_name || null"></p>
            </td>
            <td class="align-l">
                <p ng-bind="principal.principal_department_name"></p>
            </td>
            <td class="align-l">
                <p ng-bind="principal.principal_area_name"></p>
            </td>
            <td class="align-m">
                <p ng-bind="principal.principal_on"></p>
            </td>
            <td class="align-m">
                <p ng-bind="principal.principal_end"></p>
            </td>
            <td class="align-m">
                <p ng-bind="principal.principal_remark"></p>
            </td>

            <td class="align-m">
                <div ng-if="userAuthList.indexOf('0001') !== -1">
                    <a href="javascript:;"
                       ui-dialog="修改合同主责人"
                       ui-dialog-data="principal"
                       ui-dialog-show="onPrincipalEditShow($data,$dialog,$dialogScope,principal)"
                       ui-dialog-ok="saveContractPrincipal($data,$dialog,$dialogScope)"
                       ui-dialog-cache="false"
                       ui-dialog-url="${require('../pages/base/base-inc-edit-principal.html?url')}"
                       ng-if="contractBaseInfo.contract_status == 0"
                    >修改</a>
                    <a href="javascript:void(0)" ng-click="delPrincipal(principal)" title="删除产品"
                       ng-if="contractBaseInfo.contract_status == 0"
                    >删除</a>
                </div>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="no-data" style="display:none"><span>暂无数据</span></div>

</div>
